package com.cjg.javaBasics;


public class exceptionTest {
    public static void main(String[] args) {
        int a = 0 ,b=1;

        try {
            //监控区  ctrl +alt +t 快捷生成
            System.out.println(b/a);
        }catch (ArithmeticException e){
            System.out.println("出错");
        }finally{
            System.out.println("每次都执行，处理善后工作一般是 io 资源 关闭");
        }
        new exceptionTest().test(1,0);


    }
        public void test(int c ,int d)throws ArithmeticException{
                if (d==0){
                    throw new ArithmeticException();

                }
        }

}
